<extend name="template/base_index" />

<block name="area_header">
	
	<link type="text/css" rel="stylesheet" href="__CDN__/select2/4.0.0/css/select2.min.css" />
	<link type="text/css" rel="stylesheet" href="__CDN__/select2/4.0.0/css/cosmo-skin.css" />
</block>

<block name="area_body">
	{:W('Menus/topbar')}
	<div class="admin-main container-fluid">
		{:W('Menus/left')}
		<div class="admin-main-content">
			{:W('Menus/breadcrumb')}
			<div class="well clearfix">
				<form class="form form-inline">				
					<div class="col-lg-12 col-md-12">
						<label for="ss_keyword" class="control-label">首次关注时响应关键词：</label>
						<select id="ss_keyword" name="ss_keyword" style="width: 120px;" data-href="{:U('Admin/Wxaccount/saveFirstResp')}" class="sle_ajax_post form-control input-normal select2">
									<option value="">=无=</option>
								<volist name="keywords" id="vo">
									<option value="{$vo.keyword}" <if condition=" C('SS_KEYWORD') eq $vo['keyword'] ">selected="selected"</if> >{$vo.keyword}</option>
								</volist>
						</select>
					</div>
				</form>
			</div>
			<ul class="nav nav-tabs" role="tablist" id="configTab">
				<li role="presentation" class="active">
					<a href="#tab1" role="tab" data-toggle="tab">文本回复</a>
				</li>
				<li role="presentation" class="">
					<a href="{:U('Admin/WxreplyNews/index')}" role="tab" >图文回复</a>
				</li>
			</ul>

			<!-- Tab panes -->
			<div class="tab-content ">
				<div role="tabpanel" class="tab-pane fade clearfix active in" id="tab1">
					<div class="controls">
						<a class="btn btn-primary btn-sm" href="{:U('Admin/WxreplyText/add')}"><i class="fa fa-plus"></i>新增</a>
						<a href="{:U('Admin/WxreplyText/bulkDelete')}" class="confirm ajax-post btn btn-danger btn-sm" target-form="selectitem"><i class="fa fa-trash"></i>删除</a>
					</div>

					<table class="table table-striped table table-hover  table-condensed">
						<thead>
							<tr>
								<th>
									<input type="checkbox" class="selectall" onclick="myUtils.selectall(this,'.selectitem');" />{:L('SELECT_ALL')} 
								</th>
								<th>
									关键词
								</th>
								<th>
									内容
								</th>
								<th>
									更新时间
								</th>
								<th>
									{:L('OPERATOR')}
								</th>
							</tr>
						</thead>
						<tbody>
							<volist name="list" id="vo">
								<tr>
									<td><input type="checkbox" value="{$vo.id}" name="ids[]" class="selectitem" /></td>
									<td>{$vo.keyword}</td>
									<td>{$vo.content}</td>
									<td>{$vo.updatetime|date="y-m-d",###}</td>
									<td>
										<a href="{:U('Admin/WxreplyText/edit',array('id'=>$vo['id']))}" class="btn btn-sm btn-primary"><i class="fa fa-trash"></i>编辑</a>										
									</td>
								</tr>
							</volist>
						</tbody>
					</table>
					<div>{$show}</div>
				</div>
				<div role="tabpanel" class="tab-pane fade clearfix" id="tab1">
					图文回复
				</div>
			</div>
		</div>
		<!-- END admin-main-content -->
	</div>
	<!-- END admin-main-->
</block>

<block name="area_footer">

	<script src="__CDN__/select2/4.0.0/js/select2.min.js"></script>
	<script src="__CDN__/select2/4.0.0/js/i18n/zh-CN.js"></script>
	<!--<script src="__CDN__/bootstrap-touchspin/jquery.bootstrap-touchspin.min.js"></script>-->
	<script>
		$(function() {
			
			$(".select2").select2({
				language:"zh-CN"
			});
		});
	</script>
</block>